<?php  
defined('APPLICATION_URL')||define('APPLICATION_URL', '/ITjap(tung)/ITjap_finalversion');
session_start();
$userId=$_SESSION['userId'];
if(!isset($userId)) header('Location:'.APPLICATION_URL.'/index.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<!-- head - Finished -->
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
	<link rel="stylesheet" href="../../css/layout.css" type="text/css" media="screen" />
	<link rel="stylesheet" href="../../css/login.css" type="text/css" media="screen" />	
	<title>会議室予約システム</title>
</head>
<!-- /head - Finished -->

<script type="text/javascript">
	function checkForm()
	{
		//var x=document.forms["form1"]["mail"].value;
		var y=document.forms["form1"]["oldPassword"].value;
		var z=document.forms["form1"]["newPassword"].value;
		var t=document.forms["form1"]["retypeNewPassword"].value;
		//var atpos=x.indexOf("@");
		//var dotpos=x.lastIndexOf(".");
		if (y==null || y=="" || z==null || z=="" ||t==null || t=="" )
		  {
			  alert("Blank must be filled out");
			  return false;
		  }
		
		else if (z!=t)
		  {
			  alert("Retype passwd invalid!!!");
			  return false;
		  }
	}
</script>

<body>
<!-- header area -->
<form name="form1" method="post" action="../../controller/changeUserPass.php" onsubmit="return checkForm();"  id="form1">
	<div id="header_area">
	  <div id="header">
	    <div id="header_link_area">
	      <a name="pagetop"></a>
	      <div id="header_appeal"></div>
	      <div id="header_link">
	        <ul>
	           <li class="header_b_1">
                    <a class="header_b_1" href="../../index.php">
                        <img width="56" height="21" alt="ホーム" src="../../images/header/header_b_1.gif">
                    </a>
                 </li>
                 <li class="logout">
                    <a class="header_b_2" href="../../controller/logout.php">
                        <img width="71" height="21" alt="ログアウト" src="../../images/header/header_b_5.gif">
                    </a>
                 </li>
                 <li class="header_b_3">
                    <a class="header_b_3" href="Register.php">
                        <img width="155" height="21" alt="新規会員登録" src="../../images/header/header_b_3.gif">
                    </a>
                </li>
                <li class="header_b_4">
                    <a class="header_b_4" href="../../index.php">
                        <img width="82" height="21" alt="お問い合せ" src="../../images/header/header_b_4.gif">
                    </a>
                </li>
	        </ul>
	      </div>
	    </div>
	    <div id="header_title">
	       <img id="SiteHeader1_imgTitle" src="../../images/header/header_sys_title_1.gif" alt="貸会議室予約" style="height:90px;width:795px;border-width:0px;" /> 
	    </div>
	  </div>
	</div>
<!-- header area-->
	
<!-- pan_area -->
	      <div id="pan_area">
	        <div id="pan">
	          <ul>
	            <li>&nbsp;</li>
	          </ul>
	        </div>
	      </div>
<!-- pan_area -->
	  
<!-- /main -->
	<div id="main_top_area">&nbsp;</div>   
	<!-- main_middle_area -->   
	<div id="main_middle_area">
	    <!-- main area-->
		<div id="main_area">		
			<!-- main -->
			<div id="main">
                            <!-- navi -->
				      <div id="navi">
				        <ul>
				          <li class="tenanto_yoyaku"><a href="book_room.php" class="navi_b_1"><img src="../../images/navi/tenanto_yoyaku.gif" alt="会議室予約" width="145" height="39" /></a></li>
				          <li class="tenanto_sansho"><a href="view_room.php" class="navi_b_2"><img src="../../images/navi/tenanto_sansho.gif" alt="予約参照" width="145" height="39" /></a></li>
				          <li class="tenanto_setting"><a href="Change_Info.php" class="navi_b_3"><img src="../../images/navi/tenanto_setting.gif" alt="個人情報変更" width="145" height="39" /></a></li>
				          <li class="tenanto_resetpass"><a href="Change_pass.php" class="navi_b_4"><img src="../../images/navi/tenanto_resetpass.gif" alt="パスワード変更" width="145" height="39" /></a></li>

				        </ul>
				      </div>
				   <!-- /navi -->
				  <!-- Change_pass -->
		          <div id="Change_pass">	
						<?php if($_GET['changepass']=="f") echo "Password error!";?>
			            <!-- password -->
			            <div id="password">
				              <label for="password">old パスワード</label>
				              <input name="oldPassword" type="password" id="tbPassword" class="width_20" />
			            </div>
			            <div id="password">
				              <label for="password">new パスワード</label>
				              <input name="newPassword" type="password" id="tbPassword" class="width_20" />
			            </div>
			            <div id="password">
				              <label for="password">retype new パスワード</label>
				              <input name="retypeNewPassword" type="password" id="tbPassword" class="width_20" />
			            </div>
			            <!-- button -->		
			            <div id="button">
			              	<input type="submit" name="btnLogin" value=" 変更" id="btnLogin" />
			            </div>
		            	<!-- <span id="lblMessage" style="font-size:1.2em;"><br />ログインに失敗しました。<br />ログインIDまたはパスワードを確認してください</span> -->
		          </div>
          		  <!-- Change_pass -->	    
			</div>
	  		<!-- /main -->	  	
		</div>
		<!-- /main_area-->
	 </div>
	 <!-- /main_middle_area -->
	<div id="main_bottom_area">&nbsp;</div>
<!-- /main -->
      
<!-- FOOTER -->
	<div id="footer_area">
	  <div id="footer">
	    <ul>
	      <li class="left"><a href="../../index.php">ホーム</a></li>
	      <li><a href="logout.php">ログアウト</a></li>
	      <li><a href="register.php">個人情報変更</a></li>
	      <li><a href="../../index.php">Q&A</a></li>
	    </ul>
	    <p>Copyright&nbsp;&copy;&nbsp;Team 08</p>
	  </div>
	</div>
<!-- FOOTER -->	
</form>
</body>
</html>